<?php
if(isset($_POST['submit'])) {
        include_once('./conf/conf.admin.php');
        include_once('../pmod/member/lib/class.nh_Member.php');
        $mem = nh_Member::getInstance();
        $mem->init();
    if($mem->login($_POST['usrname'],$_POST['pass'])){
        //login ok
        echo "login ok for guest/geust<br>";
        echo $mem->getProperty('email');
    } else {
        //auth error
        echo "<script>alert('xxincorrect');location.replace('./')</script>";
    }
} else {
    //First Login
    include_once('./conf.admin.php');
    $tpl->assign('version','version 0.0.1');
    $tpl->display('be_login.htm');
}
?>
